<template>
  <div class="showbox">
    <!-- <div class="hotbox_big boxshadow " >
      <a href="">
        <img src="" />
      </a>
    </div> -->
    <!-- 2 -->
    <div
      class="hotbox boxshadow"
      v-for="item in showlist"
      :key="item.id"
      @click="Goodsjump(item.id)"
    >
      <a>
        <div class="hotimg">
          <img v-lazy="item.s_photos[0].path" />
        </div>
        <p class="name">{{ item.name }}</p>
        <p class="title">{{ item.desc }}</p>
        <p class="price">{{ item.price }}元</p>
      </a>
    </div>
  </div>
</template>

<script>
export default {
  props: ["showlist"],
  data() {
    return {

    };
  },
  created: function () {
  },
  methods: {
    Goodsjump(id) {
        this.$router.push({
          path: "/detailspage",
          query: {
            id: id,
          },
        },() => {});
    },
  },
};
</script>

<style lang="scss" scoped>
.showbox {
  display: flex;
  justify-content: space-between;
  align-content: space-between;
  flex-wrap: wrap;
  height: 620px;
  cursor: pointer;
  // .hotbox_big {
  //   box-sizing: border-box;
  //   text-align: center;
  //   width: 230px;
  //   height: 300px;
  //   overflow: hidden;
  //   background-color: #f9f9f9;
  //   overflow: hidden;
  //   a {
  //     img {
  //       height: 100%;
  //     }
  //   }
  // }
  .hotbox {
    box-sizing: border-box;
    padding: 20px 0;
    text-align: center;
    width: 230px;
    height: 300px;
    overflow: hidden;
    background-color: #fff;
    position: relative;
    a {
      height: 300px;
      span {
        box-sizing: border-box;
        padding: 2px 9px;
        color: #fff;
        font-size: 14px;
        background-color: #ff6a6e;
        height: 22px;
        border-radius: 0 0 6px 6px;
      }
      .name {
        font-size: 14px;
        color: black;
        font-weight: bolder;
        margin: 10px 0;
        width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
      .title {
        white-space: wrap;
        margin: 0 5px 0 5px;
        color: #999;
        font-size: 12px;
      }
      .price {
        margin: 0;
        font-size: 14px;
        color: $color;
        position: absolute;
        left: 50%;
        transform: translate(-50%, -50%);
        bottom: 0;
      }
      .hotimg {
        width: 150px;
        height: 150px;
        margin: 0 40px;
        background-color: #fff;
        img {
          width: 150px;
          height: 150px;
        }
      }
    }
  }
}



</style>